package com.pcbly.web.bean.mail;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.pcbly.web.bean.AbstractBaseBean; 

public class UserMailBean extends AbstractBaseBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1343380949274746539L; 
	
	private String userName;
	
	private String password; 
	
	private String smtpHostName;
	
	private String smtpSSL;
	
	private int smtpPort;
	
	private String autoConnect;
	
	private String hostName;
	
	private int port=143;
	
	private String title;
	
	private String userId;
	
	private String popHostName; 
	
	private String popSSL;
	
	private int popPort;  

	public String getAutoConnect() {
		return autoConnect;
	}

	public void setAutoConnect(String autoConnect) {
		this.autoConnect = autoConnect;
	} 

	public String getSmtpHostName() {
		return smtpHostName;
	}

	public void setSmtpHostName(String smtpHostName) {
		this.smtpHostName = smtpHostName;
	}

	public String getSmtpSSL() {
		return smtpSSL;
	}

	public void setSmtpSSL(String smtpSSL) {
		this.smtpSSL = smtpSSL;
	}

	public int getSmtpPort() {
		return smtpPort;
	}

	public void setSmtpPort(int smtpPort) {
		this.smtpPort = smtpPort;
	}

	public String getPopHostName() {
		return popHostName;
	}

	public void setPopHostName(String popHostName) {
		this.popHostName = popHostName;
	} 

	public String getPopSSL() {
		return popSSL;
	}

	public void setPopSSL(String popSSL) {
		this.popSSL = popSSL;
	}

	public int getPopPort() {
		return popPort;
	}

	public void setPopPort(int popPort) {
		this.popPort = popPort;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		return EqualsBuilder.reflectionEquals(this, object);
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public int getPort() {
		if(port==0){
			return 143;
		}
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	} 


}
